﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using crm_dal.Objects;
using crm_library.Javascript;

namespace crm_web.DataPages
{
    public partial class CreateContact : System.Web.UI.Page
    {
        crm_dal.Objects.Contact displayContact;

        protected void Page_Load(object sender, EventArgs e)
        {
            displayContact= new crm_dal.Objects.Contact(Convert.ToInt32(HttpContext.Current.Session["Selection"]));
        }

        protected void btnCreate_Click(object sender, EventArgs e)
        {
            displayContact.ClientID = Convert.ToInt32(txtClientID);
            displayContact.FollowupByDate = Convert.ToDateTime(txtFollowUpByDate);
            displayContact.UserID = Convert.ToInt32(txtUserID);
            displayContact.TypeInt = Convert.ToInt32(txtType);
            
            displayContact.Create();
        }
    }
}